SpdrBrokerCancel
Records inserted into this table causes the corresponding parent broker to cancel the current underlying parent order if active and cancellable.
METADATA
Attribute | Value |
---|---|
Topic | 3985-parent-orders |
MLink Token | ClientTrading |
Product | SRTrade |
accessType | SELECT,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
accnt | VARCHAR(16) | PRI | '' | SR trading account |
secKey_at | enum - AssetType | PRI | 'None' | Composite Security Key |
secKey_ts | enum - TickerSrc | PRI | 'None' | Composite Security Key |
secKey_tk | VARCHAR(12) | PRI | '' | Composite Security Key |
secKey_yr | SMALLINT UNSIGNED | PRI | 0 | Composite Security Key |
secKey_mn | TINYINT UNSIGNED | PRI | 0 | Composite Security Key |
secKey_dy | TINYINT UNSIGNED | PRI | 0 | Composite Security Key |
secKey_xx | DOUBLE | PRI | 0 | Composite Security Key |
secKey_cp | enum - CallPut | PRI | 'Call' | Composite Security Key |
secType | enum - SpdrKeyType | PRI | 'None' | Security Type Stock Future Option |
groupingCode | CHAR(19) | PRI | '0000-0000-0000-0000' | |
spdrSource | enum - SpdrSource | PRI | 'None' | |
orderSide | enum - BuySell | PRI | 'None' | |
clientFirm | VARCHAR(16) | PRI | '' | SR client firm |
sysEnvironment | enum - SysEnvironment | 'None' | original source sys environment Stable Current etc | |
runStatus | enum - RunStatus | 'None' | original source run status ProdBeta | |
cxlReason | VARCHAR(16) | '' | ||
altCancelId | VARCHAR(24) | '' | ||
engineName | VARCHAR(32) | '' | set by the engine handling event should be blank on arrival | |
modifiedBy | VARCHAR(24) | '' | user who last modified this record | |
modifiedIn | enum - SysEnvironment | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
accnt | 1 |
secKey_tk | 2 |
secKey_yr | 3 |
secKey_mn | 4 |
secKey_dy | 5 |
secKey_xx | 6 |
secKey_cp | 7 |
secKey_at | 8 |
secKey_ts | 9 |
secType | 10 |
groupingCode | 11 |
spdrSource | 12 |
orderSide | 13 |
clientFirm | 14 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRTrade`.`MsgSRBrokerCancel` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR trading account',
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'Composite Security Key',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'Composite Security Key',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'Composite Security Key',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Composite Security Key',
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Composite Security Key',
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Composite Security Key',
`secKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Composite Security Key',
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'Composite Security Key',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None' COMMENT 'Security Type [Stock, Future, Option]',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None',
`orderSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`runStatus` ENUM('None','Prod','Beta','UAT','SysTest') NOT NULL DEFAULT 'None' COMMENT 'original (source) run status [Prod,Beta]',
`cxlReason` VARCHAR(16) NOT NULL DEFAULT '',
`altCancelId` VARCHAR(24) NOT NULL DEFAULT '',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'set by the engine handling event (should be blank on arrival)',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
PRIMARY KEY USING HASH (`accnt`,`secKey_tk`,`secKey_yr`,`secKey_mn`,`secKey_dy`,`secKey_xx`,`secKey_cp`,`secKey_at`,`secKey_ts`,`secType`,`groupingCode`,`spdrSource`,`orderSide`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records inserted into this table causes the corresponding parent broker to cancel the current underlying parent order if active and cancellable.';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`secKey_at`,
`secKey_ts`,
`secKey_tk`,
`secKey_yr`,
`secKey_mn`,
`secKey_dy`,
`secKey_xx`,
`secKey_cp`,
`secType`,
`groupingCode`,
`spdrSource`,
`orderSide`,
`clientFirm`,
`sysEnvironment`,
`runStatus`,
`cxlReason`,
`altCancelId`,
`engineName`,
`timestamp`
FROM `SRTrade`.`MsgSRBrokerCancel`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`secKey_tk` = 'Example_secKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_dy` = 1
AND
/* Replace with a DOUBLE */
`secKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType` = 'None'
AND
/* Replace with a CHAR(19) */
`groupingCode` = 'Example_groupingCode'
AND
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource` = 'None'
AND
/* Replace with a ENUM('None','Buy','Sell') */
`orderSide` = 'None'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRTrade`.`MsgSRBrokerCancel`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts`,
/* Replace with a VARCHAR(12) */
`secKey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr`,
/* Replace with a TINYINT UNSIGNED */
`secKey_mn`,
/* Replace with a TINYINT UNSIGNED */
`secKey_dy`,
/* Replace with a DOUBLE */
`secKey_xx`,
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp`,
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType`,
/* Replace with a CHAR(19) */
`groupingCode`,
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource`,
/* Replace with a ENUM('None','Buy','Sell') */
`orderSide`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') */
`sysEnvironment`,
/* Replace with a ENUM('None','Prod','Beta','UAT','SysTest') */
`runStatus`,
/* Replace with a VARCHAR(16) */
`cxlReason`,
/* Replace with a VARCHAR(24) */
`altCancelId`,
/* Replace with a VARCHAR(32) */
`engineName`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
'None',
'None',
'Example_secKey_tk',
123,
1,
1,
4.56,
'Call',
'None',
'Example_groupingCode',
'None',
'None',
'Example_clientFirm',
'None',
'None',
'Example_cxlReason',
'Example_altCancelId',
'Example_engineName',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRTrade`.`MsgSRBrokerCancel`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`secKey_tk` = 'Example_secKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_dy` = 1
AND
/* Replace with a DOUBLE */
`secKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType` = 'None'
AND
/* Replace with a CHAR(19) */
`groupingCode` = 'Example_groupingCode'
AND
/* Replace with a ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') */
`spdrSource` = 'None'
AND
/* Replace with a ENUM('None','Buy','Sell') */
`orderSide` = 'None'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SpdrBrokerCancel' ORDER BY ordinal_position ASC;